 // 用例管理（增删改查、执行）
 import request from './request'

// 获取用例列表
export const getCaseList = (params) => {
  return request.get('/case/list/', { params })
}

// 新增用例
export const addCase = (data) => {
  return request.post('/case/', data)
}

// 编辑用例
export const editCase = (id, data) => {
  return request.put(`/case/${id}/`, data)
}

// 删除用例
export const deleteCase = (id) => {
  return request.delete(`/case/${id}/`)
}

// 执行用例
export const runCase = (id) => {
  return request.post(`/case/${id}/run/`)
}

// 批量执行用例
export const batchRunCases = (data) => {
  return request.post('/case/batch-run/', data)
}